package com.mingda.weathermagiccenter.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName grib1km_rt
 */
@TableName(value ="grib1km_rt")
@Data
public class Grib1kmRt implements Serializable {
    /**
     * 网格编号
     */
    @TableId(value = "stationKey")
    private String stationkey;

    /**
     * 时间
     */
    @TableField(value = "timeBase")
    private Date timebase;

    /**
     * 纬度
     */
    @TableField(value = "lat")
    private Double lat;

    /**
     * 经度
     */
    @TableField(value = "lon")
    private Double lon;

    /**
     * 
     */
    @TableField(value = "high")
    private Double high;

    /**
     * 
     */
    @TableField(value = "stationName")
    private String stationname;

    /**
     * 气压
     */
    @TableField(value = "pres")
    private Double pres;

    /**
     * 气温
     */
    @TableField(value = "temp")
    private Double temp;

    /**
     * 相对湿度
     */
    @TableField(value = "humi")
    private Double humi;

    /**
     * 降雨
     */
    @TableField(value = "prec")
    private Double prec;

    /**
     * 经度风向(西风为正)
     */
    @TableField(value = "uwin")
    private Double uwin;

    /**
     * 纬度风向(南风为正)
     */
    @TableField(value = "vwin")
    private Double vwin;

    /**
     * 风速
     */
    @TableField(value = "win_speed")
    private Double winSpeed;

    /**
     * 需要根据uwin,vwin 计算获得
     */
    @TableField(value = "win_dir")
    private Double winDir;

    /**
     * 
     */
    @TableField(value = "code")
    private String code;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Grib1kmRt other = (Grib1kmRt) that;
        return (this.getStationkey() == null ? other.getStationkey() == null : this.getStationkey().equals(other.getStationkey()))
            && (this.getTimebase() == null ? other.getTimebase() == null : this.getTimebase().equals(other.getTimebase()))
            && (this.getLat() == null ? other.getLat() == null : this.getLat().equals(other.getLat()))
            && (this.getLon() == null ? other.getLon() == null : this.getLon().equals(other.getLon()))
            && (this.getHigh() == null ? other.getHigh() == null : this.getHigh().equals(other.getHigh()))
            && (this.getStationname() == null ? other.getStationname() == null : this.getStationname().equals(other.getStationname()))
            && (this.getPres() == null ? other.getPres() == null : this.getPres().equals(other.getPres()))
            && (this.getTemp() == null ? other.getTemp() == null : this.getTemp().equals(other.getTemp()))
            && (this.getHumi() == null ? other.getHumi() == null : this.getHumi().equals(other.getHumi()))
            && (this.getPrec() == null ? other.getPrec() == null : this.getPrec().equals(other.getPrec()))
            && (this.getUwin() == null ? other.getUwin() == null : this.getUwin().equals(other.getUwin()))
            && (this.getVwin() == null ? other.getVwin() == null : this.getVwin().equals(other.getVwin()))
            && (this.getWinSpeed() == null ? other.getWinSpeed() == null : this.getWinSpeed().equals(other.getWinSpeed()))
            && (this.getWinDir() == null ? other.getWinDir() == null : this.getWinDir().equals(other.getWinDir()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStationkey() == null) ? 0 : getStationkey().hashCode());
        result = prime * result + ((getTimebase() == null) ? 0 : getTimebase().hashCode());
        result = prime * result + ((getLat() == null) ? 0 : getLat().hashCode());
        result = prime * result + ((getLon() == null) ? 0 : getLon().hashCode());
        result = prime * result + ((getHigh() == null) ? 0 : getHigh().hashCode());
        result = prime * result + ((getStationname() == null) ? 0 : getStationname().hashCode());
        result = prime * result + ((getPres() == null) ? 0 : getPres().hashCode());
        result = prime * result + ((getTemp() == null) ? 0 : getTemp().hashCode());
        result = prime * result + ((getHumi() == null) ? 0 : getHumi().hashCode());
        result = prime * result + ((getPrec() == null) ? 0 : getPrec().hashCode());
        result = prime * result + ((getUwin() == null) ? 0 : getUwin().hashCode());
        result = prime * result + ((getVwin() == null) ? 0 : getVwin().hashCode());
        result = prime * result + ((getWinSpeed() == null) ? 0 : getWinSpeed().hashCode());
        result = prime * result + ((getWinDir() == null) ? 0 : getWinDir().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", stationkey=").append(stationkey);
        sb.append(", timebase=").append(timebase);
        sb.append(", lat=").append(lat);
        sb.append(", lon=").append(lon);
        sb.append(", high=").append(high);
        sb.append(", stationname=").append(stationname);
        sb.append(", pres=").append(pres);
        sb.append(", temp=").append(temp);
        sb.append(", humi=").append(humi);
        sb.append(", prec=").append(prec);
        sb.append(", uwin=").append(uwin);
        sb.append(", vwin=").append(vwin);
        sb.append(", winSpeed=").append(winSpeed);
        sb.append(", winDir=").append(winDir);
        sb.append(", code=").append(code);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}